  /**
   * 获取当前组件的 queryId 值，如果是动态组件则从 $attrs 中获取，否则从路由中获取
   * @returns {string|null} queryId 值或者 null
   */
export function getComponentQueryId() {
  let queryId = null
  // const isComponent = this.$options._componentTag === 'component'
  // console.log('isComponent', this.$options._componentTag)
  if (this.$attrs.parameter && this.$attrs.parameter.queryId) {
    queryId = this.$attrs.parameter.queryId
  } else {
    const currentRoute = this.$route
    if (currentRoute && currentRoute.query && currentRoute.query.queryId) {
      queryId = currentRoute.query.queryId
    }
  }
  return queryId
}
